#include "CHotKey.h"

CHotKey::CHotKey()
{
	Init(NULL, NULL);
}

CHotKey::~CHotKey()
{
	Init(NULL, NULL);
}

void CHotKey::Init(CMessage* pMessage, char* szImageFile)
{
	m_pMessage = pMessage;
	m_nImageID = CSGD_TextureManager::GetInstance()->LoadTexture(szImageFile);
}

void CHotKey::Execute()
{
	if(m_pMessage != NULL)
		MailSystem::GetInstance()->SendMail(m_pMessage);
	m_pMessage = NULL;
}

void CHotKey::Render(int nPosX, int nPosY)
{
	CSGD_TextureManager::GetInstance()->Draw(m_nImageID, nPosX, nPosY);
}